/////////////////////////////////////////////////////////////////////////////
// Copyright(c) 2012-2015 purang All Rights Reserved
// Name:        thread.cc
// Purpose:
// Author:      syy
// Modified by:
// Created:     2014/1/3 15:42
// RCS-ID:
// Licence:
/////////////////////////////////////////////////////////////////////////////

#include "thread_wrapper.h"

#if defined(_WIN32)
#include "thread_win.h"
#else
#include "thread_posix.h"
#endif

namespace qb {

ThreadWrapper* ThreadWrapper::CreateThread(ThreadRunFunction func,
                                           ThreadObj obj, ThreadPriority prio,
                                           const char* thread_name) {
#if defined(_WIN32)
  return new ThreadWindows(func, obj, prio, thread_name);
#else
  return ThreadPosix::Create(func, obj, prio, thread_name);
#endif
}

bool ThreadWrapper::SetAffinity(const int* processor_numbers,
                                const unsigned int amount_of_processors) {
  return false;
}

}  // namespace qb
